home *** CD-ROM | disk | FTP | other *** search
/ Asia X / Asia X.iso / mac / ASIAWIN / PIX / SLIDESHO.DIR / 00003.ls < prev    next >
Encoding:
Text File  |  1995-09-11  |  1.3 KB  |  61 lines

  1. on startMovie
  2.   global gSong, gSlideSpeed, gPicCount
  3.   set the movieRate of sprite 3 to 0
  4.   updateStage()
  5.   set gPicCount to 1
  6.   songUpdate()
  7.   startTimer()
  8. end
  9.  
  10. on songUpdate
  11.   if not soundBusy(1) then
  12.     startNewsong()
  13.   end if
  14. end
  15.  
  16. on startNewsong
  17.   global gSong, gSlideSpeed, gLastSong
  18.   if gSong = 0 then
  19.     set gSong to 5
  20.   end if
  21.   if gSlideSpeed = 0 then
  22.     set gSlideSpeed to 2
  23.   end if
  24.   set randomSong to random(4)
  25.   repeat while randomSong = gLastSong
  26.     set randomSong to random(4)
  27.   end repeat
  28.   set songs to list("ONE.WAV", "FOUR.WAV", "THREE.WAV", "FOUR.WAV")
  29.   if gSong = 5 then
  30.     preLoadCast(the number of cast getAt(songs, randomSong))
  31.     puppetSound(getAt(songs, randomSong))
  32.     set gLastSong to randomSong
  33.   else
  34.     preLoadCast(the number of cast getAt(songs, gSong))
  35.     puppetSound(getAt(songs, gSong))
  36.   end if
  37. end
  38.  
  39. on doSlide numSlides
  40.   global gPicCount, gSlideSpeed
  41.   repeat while the timer < (gSlideSpeed * 10 * 60)
  42.     if the mouseDown then
  43.       sound stop 1
  44.       set the visible of sprite 3 to 0
  45.       updateStage()
  46.       play done
  47.     end if
  48.   end repeat
  49.   if gPicCount = numSlides then
  50.     set gPicCount to 0
  51.     startTimer()
  52.     go(the frame + 1)
  53.   end if
  54.   set the movieTime of sprite 3 to gPicCount * 60
  55.   songUpdate()
  56.   startTimer()
  57.   put "gPicCount=", gPicCount
  58.   set gPicCount to gPicCount + 1
  59.   go(the frame)
  60. end
  61.